/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package vn.webapp.model;

import java.io.Serializable;
import javax.persistence.AssociationOverride;
import javax.persistence.AssociationOverrides;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;

/**
 *
 * @author Tonytran
 */
@Entity
@Table(name = "sessions")
//@AssociationOverrides({@AssociationOverride(name = "sessions",joinColumns = @JoinColumn(name = "id")) })
public class SessionsTimeTabling implements Serializable
{
    @Id
    @GeneratedValue
    @Column(name = "session_id")
    private int session_id;
    
    @Column(name = "year")
    private String year;
    
    @Column(name = "semester")
    private int semester;
    
    @OneToOne
    @PrimaryKeyJoinColumn
    private CoursingTimeTabling sessionsdetail;

    public int getSession_id() {
        return session_id;
    }

    public void setSession_id(int session_id) {
        this.session_id = session_id;
    }

    public String getYear() {
        return year;
    }

    public void setYear(String year) {
        this.year = year;
    }

    public int getSemester() {
        return semester;
    }

    public void setSemester(int semester) {
        this.semester = semester;
    }

    public CoursingTimeTabling getSessionsdetail() {
        return sessionsdetail;
    }

    public void setSessionsdetail(CoursingTimeTabling sessionsdetail) {
        this.sessionsdetail = sessionsdetail;
    }
    
}
